package com.sibbay.vta.tools;

import com.sibbay.tools.Sharable;

import android.content.Intent;
import android.test.AndroidTestCase;

public class SharableTest extends AndroidTestCase {
	
	private static final String EXTRA_TEST = "test";
	
	public void testSharable() {
		final Object obj1 = new Object();
		final Intent in = new Intent();
		in.putExtra(EXTRA_TEST, new Sharable(obj1));
		
		final Sharable s = in.getExtras().getParcelable(EXTRA_TEST);
		final Object obj2 = s.obj();
		
		assertEquals("same sharable object", obj1, obj2);
	}
}
